import { defineStore } from 'pinia';

export const usetmplate6Store = defineStore('usetmplate6Store', {
  state: () => ({
    isUnitTem6: -1,
    childrenIndex: 0,
    isLogo: true,
    childModel: {
      id: 0,
      level: 0,
      number: 0,
      parentId: 0,
      remarks: '',
      sort: 0,
      text: '',
      type: 1,
      value: '',
      children: [],
    },
  }),
  actions: {
    setIslogo(data) {
      this.isLogo = data;
    },
    setChildrenIndex(index) {
      this.childrenIndex = index;
    },
    setIsUnitTem6(data) {
      this.isUnitTem6 = data;
    },
    setChildModel(data) {
      this.childModel = data;
    },
  },
  persist: true,
});
